function getNum(date){
    var arr  = [];
    for(var i=0;i<date.length;i++){
        if(!isNaN(date[i]*1)){
            arr.push(date[i])  
        }
    }
    return arr.join("");
}
$(function(){
	var myDate = new Date(),
		year = myDate.getFullYear(),
		month =  (myDate.getMonth()+1),
		day = myDate.getDate();
		today = year*10000 + month*100 + day;
	console.log(today);
	var delively_day = getNum($('#deliveryTime').html());
	console.log(delively_day);
	$('#btnSubmit').click(function(){
		if(today > delively_day){
			$('#dialog2').show().on('click', '.weui_btn_dialog', function () {
                $('#dialog2').off('click').hide();
            });
		}else{
			window.location.href = 'edit.html';
		}
	});
});